package A1;

/**
 * Created by IntelliJ IDEA.
 * User: Ferdy
 * Date: 07 Apr 11
 * Time: 19:22:34
 * To change this template use File | Settings | File Templates.
 */
public class TrafficLight {
    char trafficLight = 'G';
    
    public void trafficLight(int count){
        if(count>0){
            if(count%20==10)trafficLight='R';
            else if(count%20==0)trafficLight='G';
        }
    }

    public char[][] trafficLightPos(char trafficLight,char[][] cell,int verLane){
        if(trafficLight=='G') cell[10-1][10+1+verLane+1]='G';
        else cell[10-1][10+1+verLane+1]='R';
        return cell;
    }
}
